package com.haizhi.bean;

// Generated 2016-8-15 17:44:37 by Hibernate Tools 3.2.2.GA

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Entity: 
 */
@Entity
@Table(name = "tb_user_follow", catalog = "db_lemon3d")
public class TbUserFollow implements java.io.Serializable {

	/** 
	 * ��id.
	 */

	private Integer followId;

	/** 
	 * ��ע��id.
	 */

	private TbUser tbUserByFollowUserId;

	/** 
	 * �û�id.
	 */

	private TbUser tbUserByUserId;

	/** 
	 * ��עʱ��.
	 */

	private Date followTime;

	public TbUserFollow() {
	}

	public TbUserFollow(TbUser tbUserByFollowUserId, TbUser tbUserByUserId,
			Date followTime) {
		setTbUserByFollowUserId(tbUserByFollowUserId);
		setTbUserByUserId(tbUserByUserId);
		setFollowTime(followTime);
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "follow_id", unique = true, nullable = false)
	public Integer getFollowId() {
		return this.followId;
	}

	public void setFollowId(Integer followId) {
		this.followId = followId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "follow_user_id", nullable = false)
	public TbUser getTbUserByFollowUserId() {
		return this.tbUserByFollowUserId;
	}

	public void setTbUserByFollowUserId(TbUser tbUserByFollowUserId) {
		this.tbUserByFollowUserId = tbUserByFollowUserId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "user_id", nullable = false)
	public TbUser getTbUserByUserId() {
		return this.tbUserByUserId;
	}

	public void setTbUserByUserId(TbUser tbUserByUserId) {
		this.tbUserByUserId = tbUserByUserId;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "follow_time", nullable = false, length = 19)
	public Date getFollowTime() {
		return this.followTime;
	}

	public void setFollowTime(Date followTime) {
		this.followTime = followTime;
	}

}
